package com.example.myproject.service;

import com.example.myproject.dto.bounty.BountyContributionDTO;
import com.example.myproject.dto.bounty.BountyDTO;
import com.example.myproject.model.Bounty;
import com.example.myproject.model.BountyContribution;
import com.example.myproject.vo.ApiResponse;
import com.example.myproject.vo.BountyContributionWithBountyVO;
import com.example.myproject.vo.BountyWithSubmissionVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface BountyService {

    Bounty publishBounty(Long userId,BountyDTO bountyDTO);

    BountyContribution addContribution(Long userId, BountyContributionDTO contributionDTO);

    List<BountyWithSubmissionVO> getMyBounties(Long userId);

    List<BountyContributionWithBountyVO> getMyContributions(Long userId);

    List<BountyWithSubmissionVO> getMySubmissions(Long userId);

    List<BountyWithSubmissionVO> getAllBounties();

    ApiResponse<Void> cancelBounty(Long bountyId, Long userId);

    ApiResponse<Void> approveSubmission(Long submissionId, Long userId);

    ApiResponse<Void> rejectSubmission(Long submissionId, String reason, Long userId);

    Long submitFile(Long userId, Long bountyId, MultipartFile file);

    Long submitTorrent(Long userId, Long bountyId, MultipartFile file);

    //仲裁部分
    public List<BountyWithSubmissionVO> getSubmissionsForArbitration();

    public ApiResponse<Void> approveByArbitration(Long submissionId);

    public ApiResponse<Void> rejectByArbitration(Long submissionId);

}


